package com.atguigu.gulimall.auth.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author ：TJH
 * @date ：Created in 2020/6/25 9:15
 * @description：
 */
@Configuration
public class GulimallWebConfig implements WebMvcConfigurer {

    /**
     * @param registry
     * @GetMapping("/login.html")
     * @GetMapping("/reg.html") 可以不用写controller跳转视图，直接使用下面配置
     */
    @Override
    public void addViewControllers(ViewControllerRegistry registry) {
//        registry.addViewController("/login.html").setViewName("login");
        registry.addViewController("/reg.html").setViewName("reg");
    }
}
